<div class="login">
  <div class="login-head">
    <h1></h1>
  </div>
  <div class="login-panel">
    <div class="form-message">
      <div class="message-box">
        <div class="error-message" ng-show="(vm.validForm.username==='empty'||vm.validForm.password==='empty'||vm.validForm.captchaCode==='empty')&&(vm.validForm.msg==='')"><i class="iconfont icon-error1"></i>登录信息不能为空</div>
        <div class="error-message" ng-show="vm.validForm.msg"><i class="iconfont icon-error1"></i>{{vm.validForm.msg}}</div>
      </div>
    </div>
    <div class="login-input form-control" ng-class="{'outline-red':vm.validForm.username==='empty'}">
      <i class="iconfont icon-user"></i>
      <input type="text" placeholder="用户名" ng-model="vm.loginForm.username" ng-focus="vm.validForm.username='';vm.validForm.msg=''" ng-keyup="vm.loginEnter($event)">
    </div>
    <div class="login-input form-control" ng-class="{'outline-red':vm.validForm.password==='empty'}">
      <i class="iconfont icon-Password"></i>
      <input type="password" placeholder="密码" ng-model="vm.loginForm.password" ng-focus="vm.validForm.password='';vm.validForm.msg=''" ng-keyup="vm.loginEnter($event)">
    </div>
    <div class="captcha">
      <input type="text" ng-model="vm.loginForm.captchaCode" ng-blur="vm.checkCaptcha()" ng-focus="vm.validForm.captchaCode='';vm.validForm.msg=''" maxlength="4" ng-keyup="vm.loginEnter($event)" ng-class="{'outline-red':vm.validForm.captchaCode==='empty'||vm.validForm.captchaCode==='error'}">
      <img  title="换一张" ng-src="{{vm.captcha.image}}" ng-click="vm.createCaptcha()">
    </div>
    <button class="login-button" ng-click="vm.login()">登录</button>
  </div>
</div>